namespace dPet.Infrastructure.EntityFramework.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class AddModel3 : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.ServiceItemSKU",
                c => new
                    {
                        Id = c.String(nullable: false, maxLength: 32),
                        SKUPropertyValueIds = c.String(),
                        SKUPropertyValueNames = c.String(),
                        Price = c.Decimal(nullable: false, precision: 18, scale: 2),
                        LastModified = c.DateTime(nullable: false),
                        ServiceItem_Id = c.String(nullable: false, maxLength: 32),
                    })
                .PrimaryKey(t => t.Id)
                .ForeignKey("dbo.ServiceItem", t => t.ServiceItem_Id, cascadeDelete: true)
                .Index(t => t.ServiceItem_Id);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.ServiceItemSKU", "ServiceItem_Id", "dbo.ServiceItem");
            DropIndex("dbo.ServiceItemSKU", new[] { "ServiceItem_Id" });
            DropTable("dbo.ServiceItemSKU");
        }
    }
}
